#define  _CRT_SECURE_NO_WARNINGS 1

#include "vector.h"

void TestVector1()
{
	zzh::vector<int> v1;
	v1.resize(10, 5);
	zzh::print_vector(v1);

	zzh::vector<string> v2;
	v2.push_back("22222");
	v2.push_back("22222");
	v2.push_back("22222");
	v2.push_back("22222");
	v2.push_back("22222");
	v2.push_back("22222");
	zzh::print_vector(v2);

	zzh::vector<double> v3(10, 8.88888);
	zzh::print_vector(v3);

	zzh::vector<int> v4;
	v4 = v1;
	zzh::print_vector(v4);

	list<int> lt = { 1,2,3,4,5,6 };
	zzh::vector<int> v5(lt.begin(), lt.end());
	zzh::print_vector(v5);

	v5.insert(v5.begin(), 10);
	v5.insert(v5.end(), 20);
	v5.insert(v5.end() - 3, 99);
	zzh::print_vector(v5);

	zzh::vector<int>::iterator vit = v5.begin();
	while (vit != v5.end())
	{
		if (*vit % 2 == 0)
		{
			v5.erase(vit);
		}
		else
		{
			++vit;
		}
	}
	zzh::print_vector(v5);


}

int main()
{
	TestVector1();

	return 0;
}